package com.lottery.material.service.portal.competition.impl;

import com.lottery.material.dao.base.BaseDao;
import com.lottery.material.dao.portal.competition.CompetitionInfoDao;
import com.lottery.material.entity.article.CompetitionInfo;
import com.lottery.material.service.base.impl.BaseServiceImpl;
import com.lottery.material.service.portal.competition.CompetitionInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:houjie
 * @Description: 赛事接口实现类
 * @Date:Create in 2019/4/10 14:23
 */
@Service
@Slf4j
public class CompetitionInfoServiceImpl extends BaseServiceImpl<CompetitionInfo,Integer> implements CompetitionInfoService {

    @Autowired
    private CompetitionInfoDao competitionInfoDao;

    @Override
    public BaseDao<CompetitionInfo, Integer> getBaseDao() {
        return competitionInfoDao;
    }


    @Override
    public List<CompetitionInfo> findAllByCompetitionTypeAndState(Integer competitionType, Integer state) {
        return competitionInfoDao.findAllByCompetitionTypeAndState(competitionType,state);
    }

    @Override
    public CompetitionInfo findByCompetitionTypeAndOpenId(Integer CompetitionType,String openId) {
        return competitionInfoDao.findByCompetitionTypeAndOpenId(CompetitionType,openId);
    }
}
